/**
 * 系统日志列表返回值
 */
interface systemLogListResponse {
    /**
     * 系统日志编号
     */
    id: string,
    /**
     * 操作人员
     */
    operator: string,
    /**
     * 操作时间
     */
    operateTime: string,
    /**
     * 操作记录
     */
    operateRecord: string
}


interface ILogService{
    getList(userName: string, itemCode: string, logType: string, startTime: string, endTime: string, skip: number, count: number): ng.IHttpPromise<ListResponse<systemLogListResponse>>;
}

class logService {
    constructor(private http: ng.IHttpService, private route: routeService) {
    } 
    getList(userName: string, itemCode: string, logType: string, startTime: string, endTime: string, skip: number, count: number): ng.IHttpPromise<ListResponse<systemLogListResponse>>{
        return this.http<ListResponse<systemLogListResponse>>({
            method: "GET",
            url: this.route.getUrl("systemlog?userName={{userName}}&itemCode={{itemCode}}&logType={{logType}}&startTime={{startTime}}&endTime={{endTime}}&skip={{skip}}&count={{count}}", {
             "userName": userName,
             "itemCode": itemCode,
             "logType": logType,
             "description": null,
             "startTime": startTime,
             "endTime": endTime,
             "skip": skip,
             "count": count
            })
        })
    }
}
angular.module("logService", []).service("logService", ['$http', 'routeService', logService]);
